package com.mohansever.util;

public class ResponseUtil {
	private int code;
	private String message;
	private Object data;	
	
	public void success(String message,Object data){
		this.code = 2000;
		this.message = message;
		this.data = data;
	}
	
	public void defaultSuccess(Object data){
		this.code = 2000;
		this.message = null;
		this.data = data;
	}
	
	public void fail(int code, String message){
		this.code = code;
		this.message = message;
		this.data = null;
	}
	
	public void response(int code, String message, Object data){
		this.code = code;
		this.message = message;
		this.data = data;
	}

	public int getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public Object getData() {
		return data;
	}
}
